Fix default api_type for specific github copilot models#2376
Fix default api_type for specific github copilot models#2376joshbarrington wants to merge 4 commits intodocker:mainfrom
Conversation
|
@liketosweep can you also test this? I've actually ran out of Github Copliot credit 😆 . |
|
Hey @joshbarrington, just saw @dgageot gave it the green light! I was getting ready to pull it down but ran out of time on my end tonight before logging off. Thrilled it got approved and is ready to merge though great fix. |
|
@dgageot I just realised it makes sense to call the function earlier inside I'll push that change now |
|
@dgageot who else can we get a quick review from so we can get this fix in? |
| func isCopilotResponsesModel(model string) bool { | ||
| codex := map[string]bool{ | ||
| "gpt-5.3-codex": true, | ||
| "gpt-5.2-codex": true, |
There was a problem hiding this comment.
Maybe add "gpt-5.4-mini" and "gpt-5.4-nano" to this listt?
There was a problem hiding this comment.
Sure. I couldn't actually find a confirmed list of models with this required endpoint - do you know of any?
There was a problem hiding this comment.
I filtered the response from the /models endpoint:
curl https://api.githubcopilot.com/models -s -H "Authorization: Bearer $(gh auth token)" -H "Copilot-Integration-Id: copilot-developer-cli" | jq '[.data[] | select((.supported_endpoints | (index("/responses") != null) and (index("/chat/completions") == null))) | .id]'
closes: #2303
Some Github Copilot models require the
/responsesendpoint as opposed to/chat/completions.These are not set by default, and so certain models will fail unless a custom agent config is set with
api_type: openai_responses. This sets the default for these models asopenai_responses.@liketosweep